<?php
      
include(dirname(__FILE__).'/inc/config.php');
include(dirname(__FILE__).'/inc/listpage.class.php');
include(dirname(__FILE__).'/inc/tree.class.php');

include(dirname(__FILE__).'/inc/article.model.class.php');
include(dirname(__FILE__).'/inc/type.model.class.php');
include(dirname(__FILE__).'/inc/config.model.class.php');


//文章类
$TR  = new tree();
$DA  = new article();
$DT  = new type();
$DC  = new config();
$cfg = $DC->data;






// 文章模板  1.文章表  2.分类表  3.默认
$indextemp = isset($cfg['indextemp']) ? trim( $cfg['indextemp']) : 'indextemp.php';



$temp = ROOT.'/temp/'.$indextemp;

if (file_exists(  $temp   )  and  !is_dir( $temp )) {
    include($temp);
} else {
    echo "模板文件 $temp does not exist";
}

//var_dump(ad('test'));